$(function() {
    $('#vue_vm_list div').hide();
});

window.onload = function() {
    var printDate = getNowFormatDate().substr(0,10);
    var staffId = getLoginedUser()? getLoginedUser().staffId: '';
    findPaperReportByPaperType(printDate,staffId);
}

function findPaperReportByPaperType(printDate,staffId) {
    if($('#vue_vm_list div').length==0) {return;}
    $('#vue_vm_list div').hide();

    find_basic_by_json(path+'/paperRecord/findPaperReportByPaperType', {date: printDate, paperType: 5,staffId:staffId},
        onSuccess=function(response) {
            new Vue({
                el: '#vue_vm_list',
                data: {
                    todos: response.data
                },
                methods: {
                    getPrintDate:function() {
                        return printDate;
                    },
                }
            });
            $('#vue_vm_list div').show();
        },
        onEmpty=function(response) {
            alert("暂无数据");
            new Vue({
                el: '#vue_vm_list',
                data: {
                    todos: response.data
                },
                methods: {
                    getPrintDate:function() {
                        return printDate;
                    },
                }
            });

            $('#vue_vm_list div').show();
        }
    );
}